// 字典管理
import request from '@/utils/request'

// 获取字典列表
export const getDictPage = (data) => {
  return request({ url: `/xddcloud-psc/psc/lookup/list`, method: 'POST', data })
}

// 新增字典
export const addDict = (data) => {
  return request({ url: `/xddcloud-psc/psc/lookup/save`, method: 'POST', data })
}

// 修改字典
export const modifyDict = (data) => {
  return request({ url: `/xddcloud-psc/psc/lookup/modify`, method: 'PUT', data })
}

// 删除字典
export const deleteDict = (params) => {
  return request({ url: `/xddcloud-psc/psc/lookup/delete`, method: 'DELETE', params })
}

// 新增字典数据
export const addDataDict = (data) => {
  return request({ url: `/xddcloud-psc/psc/lookup/dataSave`, method: 'POST', data })
}
// 修改字典数据
export const modifyDataDict = (data) => {
  return request({ url: `/xddcloud-psc/psc/lookup/dataModify`, method: 'PUT', data })
}

// 删除字典数据
export const deleteDataDict = (params) => {
  return request({ url: `/xddcloud-psc/psc/lookup/dataDelete`, method: 'DELETE', params })
}
// 获取字典数据列表
export const getDictDataPage = (params) => {
  return request({ url: `/xddcloud-psc/psc/lookup/classifyCode/${params.classifyCode}/1`, method: 'GET' })
}
